package com.sanweibook.jhook.dal.datasource;

/**
 * Created by twg on 2017/5/11.
 */
public class DynamicDataSourceHolder {
    private static final ThreadLocal<String> DATA_SOURCE_HANDLER = new ThreadLocal<String>();

    public static String getDataSource(){
        return DATA_SOURCE_HANDLER.get();
    }

    public static void setDataSource(String dataSource){
        DATA_SOURCE_HANDLER.set(dataSource);
    }

    public static void clearDataSource(){
        DATA_SOURCE_HANDLER.remove();
    }

}
